package com.yf.admin.dao;

import com.yf.admin.domain.Auth;
import com.yf.admin.domain.Role;
import com.yf.admin.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper {

    List<Role> findByUser(User user);

    int saveRole(Role role);

    int saveUserRoles(Long userId,List<Long> roleIds);

    int saveRoleAuth(Long roleId,List<Long> authIds);

    List<Role> findByUrl(String url);

    Role findByName(String name);

}
